import service from '@/api/http'
const employee = {
    // 获取员工
    getEmployee(p) {
        return service.get('/employee', {
            params: p
        })
    },

    // 新增员工
    addEmployee(p) {
        return service.put('/employee/add', p)
    },

    // 更新员工
    updateEmployee(p) {
        return service.post('/employee/update', p)
    },

    // 删除员工
    deleteEmployee(p) {
        return service.delete('/employee/delete', {
            params: p
        })
    },

    // 获取部门
    getDepartment() {
        return service.get('/employee/getDepartment')
    },

    // 获取岗位
    getPosition() {
        return service.get('/employee/getPosition')
    },

    // 获取在职状态
    getEmployeeStatus() {
        return service.get('/employee/getEmployeeStatus')
    },

    // 获取修改员工初始化
    getUpdateInit(p) {
        return service.get('/employee/getUpdateInit', {
            params: p
        })
    }
}
export default employee